﻿export default [
  {
    path: '/',
    redirect: '/main',
  },
  {
    path: '/main',
    name: '主页',
    component: '@/layouts/BasicLayout',
    routes: [
      {
        path: '/main',
        redirect: '/main/first',
      },
      {
        path: '/main/first',
        name: '主应用1',
        title: '主应用1',
        component: '@/pages/Main',
      },
    ],
  },
  {
    path: '/admin',
    name: '管理员中心',
    component: '@/layouts/BasicLayout',
    routes: [
      {
        path: '/admin',
        redirect: '/admin/admin',
      },
      {
        path: '/admin/admin',
        name: '管理员',
        title: '管理员',
        component: '@/pages/Admin/Admin',
      },
      {
        path: '/admin/role',
        name: '角色',
        title: '角色',
        component: '@/pages/Admin/Role',
      },
      {
        path: '/admin/rule_ategory',
        name: '权限分类',
        title: '权限分类',
        component: '@/pages/Admin/RuleCategory',
      },
      {
        path: '/admin/rule',
        name: '权限',
        title: '权限',
        component: '@/pages/Admin/Rule',
      },
      {
        path: '/admin/menu',
        name: '菜单',
        title: '菜单',
        component: '@/pages/Admin/Menu',
      },
    ],
  },
  {
    path: '/apps',
    title: '应用中心',
    name: '应用中心',
    component: '@/layouts/BasicLayout',
    routes: [
      {
        path: '/apps/:app/*',
        hideInMenu:true,
        component: '@/layouts/MicroAppLayout',
      },
      // app运行时注入子应用路由
      // {
      //   path: '/apps/test/*',
      //   title: 'test应用',
      //   name: 'test',
      //   microApp: 'test',
      // },
    ],
  },
];
